<template>
<!-- 代理总览页面 -->
  <el-row :gutter="0" class="pandectBox userpandect">
    <!-- 左侧筛选部件 -->
    <el-col class="lft">
      <div class="grid-content bg-purple">
        <!-- 按客户筛选 -->
        <div class="user">
          <el-row :gutter="0" v-for="(item,index) in screenData.screenUser" :key="index">
            <el-menu
              default-active="1"
              class="el-menu-vertical-demo"
              @open="handleOpen"
              @close="handleClose"
            >
              <el-menu-item index="1">
                <span slot="title" class="userLft">{{item.name}}</span>
                <span class="num-ber">{{item.numBer}}</span>
              </el-menu-item>
            </el-menu>
          </el-row>
        </div>
        <!-- 按状态筛选 -->
        <div class="user">
          <el-row :gutter="0" v-for="(item,index) in screenData.screenState" :key="index">
            <el-menu
              default-active="2"
              class="el-menu-vertical-demo"
              @open="handleOpen"
              @close="handleClose"
            >
              <el-menu-item index="2">
                <span slot="title" class="userLft">{{item.name}}</span>
                <span class="num-ber">{{item.numBer}}</span>
              </el-menu-item>
            </el-menu>
          </el-row>
        </div>
        <!-- 按城市筛选 -->
        <div class="user" style="border:0;">
          <el-row
            :gutter="0"
            v-for="(item,index) in screenData.screenSite"
            :key="index"
            style=" padding:0;"
          >
            <el-menu
              default-active="1"
              class="el-menu-vertical-demo"
              @open="handleOpen"
              @close="handleClose"
            >
              <el-submenu index="1">
                <template slot="title">
                  <span class="userLft">{{item.name}}</span>
                  <span class="num-ber" style="margin-right: 23px;">{{item.numBer}}</span>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-1" class="option">
                    <span slot="title" class="userLft">{{item.child[0].name}}</span>
                    <span class="num-ber">{{item.child[0].numBer}}</span>
                  </el-menu-item>
                  <el-menu-item index="1-2" class="option">
                    <span slot="title" class="userLft">{{item.child[0].name}}</span>
                    <span class="num-ber">{{item.child[0].numBer}}</span>
                  </el-menu-item>
                </el-menu-item-group>
              </el-submenu>
            </el-menu>
          </el-row>
        </div>
      </div>
    </el-col>
    <!-- 筛选结构部分 -->
    <el-col class="rgt">
      <div class="rgt-contant">
        <div class="inquire clearfix">
          <div class="inquireOne clearfix">
            <!-- 筛选 -->
            <div class="allselect" style="float:left;position: relative;">
              <el-select v-model="value" placeholder="所有" style="width:50px">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
              <span style="position: absolute;left: 30px;top: 9px;">
                <i class="el-icon-caret-bottom"></i>
              </span>
            </div>
            <!-- 输入查找 -->
            <div class="importcase">
              <el-input v-model="input" placeholder="请输入内容" style="color:red"></el-input>
            </div>
            <div class="searchBtn">
              <el-button type="primary">搜索</el-button>
            </div>
          </div>
          <div class="inquireTwo">
            <el-select v-model="value" placeholder="标签筛选">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </div>
          <div class="inquireTwo">
            <el-select v-model="value" placeholder="标签过滤">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </div>
        </div>
        <div class="contList">
          <el-table :data="tableData" style="width: 100%">
            <el-table-column align="center" prop="username" label="用户名" style="width:20%"></el-table-column>
            <el-table-column align="center" prop="phone" label="手机号" style="width:20%"></el-table-column>
            <el-table-column align="center" prop="emily" label="邮箱" style="width:20%"></el-table-column>
            <el-table-column align="center" prop="registerdate" label="注册时间" style="width:20%"></el-table-column>
            <el-table-column align="center" prop="accounttype" label="账号类型" style="width:20%"></el-table-column>
          </el-table>
        </div>
      </div>
    </el-col>
  </el-row>
</template>

<script>
export default {
  data() {
    return {
      // 筛选测试数据
      screenData: {
        screenUser: [
          {
            name: "全部客户",
            numBer: 1245
          },
          {
            name: "未分配客户",
            numBer: 1245
          },
          {
            name: "已分配客户",
            numBer: 1245
          }
        ],
        screenState: [
          {
            name: "回收站",
            numBer: 1245
          },
          {
            name: "意向",
            numBer: 1245
          },
          {
            name: "成交",
            numBer: 1245
          }
        ],
        screenSite: [
          {
            name: "城市",
            numBer: 1245,
            child: [
              {
                name: "县城",
                numBer: 1245
              }
            ]
          },
          {
            name: "城市",
            numBer: 1245,
            child: [
              {
                name: "县城",
                numBer: 1245
              }
            ]
          },
          {
            name: "城市",
            numBer: 1245,
            child: [
              {
                name: "县城",
                numBer: 1245
              }
            ]
          }
        ]
      },
      options: [
        {
          value: "选项1",
          label: "黄金糕"
        },
        {
          value: "选项2",
          label: "双皮奶"
        },
        {
          value: "选项3",
          label: "蚵仔煎"
        },
        {
          value: "选项4",
          label: "龙须面"
        },
        {
          value: "选项5",
          label: "北京烤鸭"
        }
      ],
      tableData: [
        {
          registerdate: "2016-05-02",
          username: "王小虎",
          emily: "1042275710@qq.com",
          accounttype: "普通客户",
          phone: "18365760643"
        },
        {
          registerdate: "2016-05-04",
          username: "王小虎",
          emily: "1042275710@qq.com",
          accounttype: "普通客户",
          phone: "18365760643"
        }
      ],
      value: "",
      input: ""
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
};
</script>

<style lang="scss" scoped>
// placeholder的颜色

.clearfix:after {
  display: block;
  clear: both;
  contain: "";
}
.pandectBox {
  position: absolute;
  bottom: 60px;
  top: 85px;
  left: 192px;
  right: 125px;
  min-height: 720px;
  min-width: 1600px;
  .el-col.lft,
  .el-col.rgt {
    background: #fff;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    height: 100%;
  }
  .lft {
    width: 11.98%;
    margin-right: 15px;
    overflow: hidden;
    min-width: 190px;
    .user {
      border-bottom: 3px solid #efefef;
    }
    .el-row {
      font: {
        size: 14px;
        family: SourceHanSansCN-Regular;
        weight: 400;
      }

      .userRgt {
        padding-right: 30px;
      }
      .num-ber {
        float: right;
        margin-right: 13px;
      }
      .el-menu-item {
        padding: 0 30px !important;
      }
      .option {
        padding: 0 40px !important;
      }
    }
  }
  .rgt {
    width: 86.9%;
    min-width: 1300px;
    .rgt-contant {
      padding: 0 36px;
      .inquire {
        padding: 28px 0 33px 0;
        .inquireOne {
          float: left;
          .importcase {
            width: 200px;
            float: left;
          }
          .searchBtn {
            width: 64px;
            float: left;
            .el-button {
              padding: 9px 18px;
              border-top-left-radius: 0;
              border-bottom-left-radius: 0;
            }
          }
        }
        .inquireTwo {
          width: 200px;
          float: left;
          margin-left: 40px;
        }
      }
      .contList {
        min-height: 490px;
        background: rgba(255, 255, 255, 1);
        border: 1px solid rgba(235, 238, 245, 1);
      }
    }
  }
}
</style>

<style lang="scss">
// 修改页面里的标签
.userpandect {
  input::-webkit-input-placeholder {
    /* WebKit browsers*/
    color: #333 !important;
    font-size: 14px;
  }

  input:-moz-placeholder {
    /* Mozilla Firefox 4 to 18*/
    color: #333 !important;
    font-size: 14px;
  }

  input::-moz-placeholder {
    /* Mozilla Firefox 19+*/
    color: #333 !important;
    font-size: 14px;
  }

  input:-ms-input-placeholder {
    /* Internet Explorer 10+*/
    color: #333 !important;
    font-size: 14px;
  }
  .el-menu-item.is-active {
    color: rgba(51, 51, 51, 1);
  }
  li.el-menu-item {
    padding: 0 30px;
  }

  .el-submenu__title {
    padding: 0 30px !important;
  }
  .el-menu-item-group__title {
    padding: 0;
  }

  .inquireOne .el-select .el-input__inner {
    border: 0;
    padding: 0;
    background-color: none;
    padding-right: 20px !important;
  }
  .inquireOne .el-input__icon {
    line-height: 34px;
    display: none;
  }
  .inquireOne .el-input .el-input__inner {
    height: 34px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  .inquireTwo .el-select .el-input__inner {
    background-color: none;
    height: 34px;
  }
  .inquireTwo .el-input__icon {
    line-height: 34px;
  }
  .contList .el-table::before {
    background: none;
  }
  .el-table__body {
    .is-center {
      border: 0;
    }
  }
}
</style>

